Skip to content

ci: catch release-bump dependency rebinds on the PR that causes them - #4223

Merged
nikw9944 merged 5 commits into
mainfrom
nikw9944/doublezero-4220
Aug 24, 2026
Merged

ci: catch release-bump dependency rebinds on the PR that causes them#4223
nikw9944 merged 5 commits into
mainfrom
nikw9944/doublezero-4220

Conversation

@nikw9944

@nikw9944 nikw9944 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

Two things the diff cannot cover:

  • The job is advisory until you add it to the required checks. Ruleset 3777660 lists individual job contexts, so living in rust.yml confers nothing (rust-validator-test and rust-cli-static are in this workflow and not required either). Once it is green on main, append {"context":"release-bump-dry-run"} to required_status_checks. Noted in the docs paragraph and CHANGELOG entry.
  • It can go red for reasons unrelated to a PR. Re-resolution hits the live crates.io index, so an upstream publish can trip the guard on an unrelated PR — and on main too. This is the release-day flakiness moved somewhere cheap to fix; the remedy is always to pin the requirement, which the job's failure output says.

The bare-"0" lint (item 2 in #4220) is out: 27 such requirements remain and would all need pinning first, and this guard catches the consequence however the requirement is spelled.

Testing Verification

@nikw9944 nikw9944 self-assigned this Aug 21, 2026
@nikw9944
nikw9944 marked this pull request as ready for review August 21, 2026 18:42
@nikw9944
nikw9944 requested review from ben-dz and packethog August 21, 2026 18:42
@nikw9944
nikw9944 requested a review from a team August 21, 2026 18:54
@nikw9944
nikw9944 force-pushed the nikw9944/doublezero-4220 branch from bfa8b10 to 451150f Compare August 21, 2026 20:58
@nikw9944
nikw9944 enabled auto-merge (squash) August 21, 2026 21:01

@ben-dz ben-dz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guard works — verified it fails on 95336a36 naming the reqwest/tokio-util rebind, passes on HEAD, and passes on an already-bumped release tree. The findings are all about the failure path: the Fix: hint attributes any Cargo.lock failure to a rebind, but an uncommitted lock trips the same guard and gets sent to pin a requirement that does not exist. Two smaller items on the second hint's stated mechanism and a missing timeout-minutes.

Docs & comments (non-blocking)

  • .github/workflows/rust.yml:96 — An upstream publish cannot trip this guard: cargo update --workspace keeps already-locked versions rather than chasing the index. Three runs of this step (pre-#4219 95336a36, the v0.37.0 bump commit, and HEAD) each left ~261-263 dependencies "behind latest" while touching only the 16 member entries; a rebind needs a tree change (loose requirement plus a second locked version, as in #4213) or a yank. "Check this job on main" is still the right action — attribute it to a PR merged since your base and drop the publish clause.

Comment thread .github/workflows/rust.yml
Comment thread .github/workflows/rust.yml
The release's version bump runs cargo update --workspace, which re-resolves
every workspace member's dependency edges and can silently rebind them onto a
different locked minor. bump-version.sh already fails on that, but only ran at
release time, so the rebind that broke the v0.37.0 testnet release sat dormant
for a week after the PR that made it possible.

Run the same script against a throwaway next-minor version in PR CI and discard
the result, so the failure lands on the PR that causes it.

Refs #4220
Say plainly that the job is advisory until its context is added to the main
ruleset, and that a rebind can also arrive from the live crates.io index rather
than from the PR under test. Move the remedy into plain log lines so the error
annotation stays short enough to read in the Annotations panel.

Refs #4220
An uncommitted Cargo.lock after a Cargo.toml dependency edit trips the same
guard as a rebind, and the old hint sent that case to pin a requirement that
does not exist. Drop the upstream-publish clause too: cargo update --workspace
keeps already-locked third-party versions, so a publish alone cannot rebind.
Cap the job at 10 minutes so a hung run cannot sit on GitHub's six-hour default
once the context is required.

Refs #4220
@nikw9944
nikw9944 force-pushed the nikw9944/doublezero-4220 branch from 451150f to 947f476 Compare August 24, 2026 14:11
@nikw9944

Copy link
Copy Markdown
Contributor Author

Rebased onto main (c15a7935) and addressed all three items in 947f476.

  • The Fix: hint now names both causes — a rebind, and a Cargo.toml dependency edit whose regenerated Cargo.lock was never committed. Reproduced your unicode-xid case before changing the text.
  • Dropped the upstream-publish clause. You're right that cargo update --workspace keeps already-locked third-party versions; the second hint now points at a dependency arriving on another branch since the base. Same correction applied to the paragraph in docs/testnet-release.md, which carried the identical claim.
  • timeout-minutes: 10 on the job.

Nothing skipped.

@nikw9944
nikw9944 disabled auto-merge August 24, 2026 18:06
@nikw9944
nikw9944 merged commit 6ec4e1d into main Aug 24, 2026
38 checks passed
@nikw9944
nikw9944 deleted the nikw9944/doublezero-4220 branch August 24, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: catch release-bump dependency rebinds on the PR that causes them

3 participants